Skip to content

Build and dependencies updates - #9020

Draft
limzykenneth wants to merge 9 commits into
processing:mainfrom
limzykenneth:build-update
Draft

Build and dependencies updates#9020
limzykenneth wants to merge 9 commits into
processing:mainfrom
limzykenneth:build-update

Conversation

@limzykenneth

Copy link
Copy Markdown
Member

This updates various build and dependencies with major points listed below (these may change over time and will be updated, see edit history for previous versions):

  • Migrate build from Rollup to Rolldown
  • Upgrade Vite and Vitest to latest version
  • Migrate from Webdriverio to Playwright in Vitest browser mode
  • More to come...

Please do test out any latest build with the continuous release CDN link below and report any issues with build, test, or bugs.

@p5-bot

p5-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Vaivaswat2244

Vaivaswat2244 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

vitest.config.js only applies the SwiftShader software-rendering Chromium flags when process.env.CI is set:

provider: playwright({
              capabilities: process.env.CI
                ? {
                    'goog:chromeOptions': {
                      args: [
                        '--no-sandbox',
                        '--headless=new',
                        '--enable-unsafe-webgpu',
                        '--use-vulkan=swiftshader',
                        '--use-webgpu-adapter=swiftshader',
                        '--use-angle=vulkan'
                      ]
                    }
                  }
                : undefined
            }),

So CI renders text through SwiftShader while a local run uses whatever hardware-accelerated backend is on the machine. The 3 failing baselines were captured on the hardware path and were never regenerated for SwiftShader. that's the mismatch, not anything about the Rolldown/Playwright migration itself.

Ruled out a couple of alternatives before landing on that: (context: pixelmatch algo )

  • Not simple AA/line-shift noise — ran the diffs through the clustering algo already in visualTest.js: significantDiffPixels came out at 160 and 257 against the 40px threshold, way past what tolerance-tuning could reasonably absorb.
  • Not font-hinting — added --font-render-hinting=none --disable-lcd-text on top of the CI flags and reran under CI=true: diff numbers came back byte-identical, no change at all.
  • Not font substitution — all 3 failing tests load the same bundled test/unit/assets/Inconsolata-Bold.ttf via loadFont(), not an OS-resolved font like 'monospace'/'serif', so it's the same font bytes locally and in CI either way.

Plan:
Firstly, I guess we should drop the process.env.CI ternary so the SwiftShader args always apply, local and CI alike keeps future baselines reproducible for every contributor instead of tied to one machine's renderer. And then we have to regenerate just the 3 affected typography screenshots under that path.

The screenshots should be regenerated because in order to incorporate the build updates, we either have to update the thresholds in the matching algo checkMatch which might some flase negatives in tests, or we can regenrate baselines to match CI's standard everywhere (these are only 3 tests).

cc @davepagurek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants